﻿<UserControl x:Class="NMortgage.UI.Views.UniformRateView"             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:Properties="clr-namespace:NMortgage.UI.Properties"
             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="325">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Themes/CommonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <WrapPanel Orientation="Horizontal">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{x:Static Properties:Resources.UniformRateMinRate}" Style="{StaticResource FlowLabelStyle}" />
            <extToolkit:DecimalUpDown Style="{DynamicResource ValidatingDecimalBox}"
                                  Text="{Binding Path=Rate.Minimum, Mode=TwoWay,ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" 
                                  ToolTip="{x:Static Properties:Resources.PercentValueTip}" />
        </StackPanel>
        
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{x:Static Properties:Resources.UniformRateMaxRate}" Style="{StaticResource FlowLabelStyle}" />
            <extToolkit:DecimalUpDown  Style="{DynamicResource ValidatingDecimalBox}"
                                    Text="{Binding Path=Rate.Maximum, Mode=TwoWay,ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}" 
                                    ToolTip="{x:Static Properties:Resources.PercentValueTip}"/>
        </StackPanel>
    </WrapPanel>
</UserControl>